<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
    <title>Reference</title>
    <link rel="stylesheet" href="../../luadoc.css" type="text/css" />
	<!--meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/-->
</head>

<body>
<div id="container">

<div id="product">
	<div id="product_logo"></div>
	<div id="product_name"><big><b></b></big></div>
	<div id="product_description"></div>
</div> <!-- id="product" -->

<div id="main">

<div id="navigation">


<h1>LuaDoc</h1>
<ul>
	
	<li><a href="../../index.html">Index</a></li>
	
</ul>


<!-- Module list -->



<!-- File list -->

<h1>Files</h1>
<ul>

	<li>
		<a href="../../files/Compiler.html">Compiler.lua</a>
	</li>

	<li>
		<a href="../../files/Editor.html">Editor.lua</a>
	</li>

	<li>
		<a href="../../files/Instance.html">Instance.lua</a>
	</li>

	<li>
		<a href="../../files/Libraries.html">Libraries.lua</a>
	</li>

	<li>
		<a href="../../files/Permissions.html">Permissions.lua</a>
	</li>

	<li>
		<a href="../../files/Preprocessor.html">Preprocessor.lua</a>
	</li>

	<li>
		<a href="../../files/SFLib.html">SFLib.lua</a>
	</li>

	<li>
		<a href="../../files/libs_cl/ents.html">libs_cl/ents.lua</a>
	</li>

	<li>
		<a href="../../files/libs_cl/screen.html">libs_cl/screen.lua</a>
	</li>

	<li>
		<a href="../../files/libs_sh/builtins.html">libs_sh/builtins.lua</a>
	</li>

	<li>
		<a href="../../files/libs_sh/files.html">libs_sh/files.lua</a>
	</li>

	<li>
		<a href="../../files/libs_sh/find.html">libs_sh/find.lua</a>
	</li>

	<li>
		<a href="../../files/libs_sh/time.html">libs_sh/time.lua</a>
	</li>

	<li>
		<a href="../../files/libs_sh/trace.html">libs_sh/trace.lua</a>
	</li>

	<li>
		<a href="../../files/libs_sv/ents.html">libs_sv/ents.lua</a>
	</li>

	<li><strong>libs_sv/wire.lua</strong></li>
	
	<li>
		<a href="../../files/reload.html">reload.lua</a>
	</li>

</ul>






</div> <!-- id="navigation" -->

<div id="content">

<h1>File <code>libs_sv/wire.lua</code></h1>







<h2>Functions</h2>
<table class="function_list">

	<tr>
	<td class="name" nowrap><a href="#SF.Wire.AddInputType">SF.Wire.AddInputType</a>&nbsp;(name, converter)</td>
	<td class="summary">Adds an input type </td>
	</tr>

	<tr>
	<td class="name" nowrap><a href="#SF.Wire.AddOutputType">SF.Wire.AddOutputType</a>&nbsp;(name, deconverter)</td>
	<td class="summary">Adds an output type </td>
	</tr>

	<tr>
	<td class="name" nowrap><a href="#SF.Wire.WlUnwrap">SF.Wire.WlUnwrap</a>&nbsp;(wrapped)</td>
	<td class="summary"> </td>
	</tr>

	<tr>
	<td class="name" nowrap><a href="#SF.Wire.WlWrap">SF.Wire.WlWrap</a>&nbsp;(wirelink)</td>
	<td class="summary"> </td>
	</tr>

	<tr>
	<td class="name" nowrap><a href="#wire_library.createInputs">wire_library.createInputs</a>&nbsp;(names, types)</td>
	<td class="summary">Creates/Modifies wire inputs.</td>
	</tr>

	<tr>
	<td class="name" nowrap><a href="#wire_library.createOutputs">wire_library.createOutputs</a>&nbsp;(names, types)</td>
	<td class="summary">Creates/Modifies wire outputs.</td>
	</tr>

	<tr>
	<td class="name" nowrap><a href="#wire_library.self">wire_library.self</a>&nbsp;()</td>
	<td class="summary">Returns the wirelink representing this entity.</td>
	</tr>

	<tr>
	<td class="name" nowrap><a href="#wirelink_metatable.__index">wirelink_metatable.__index</a>&nbsp;(self, k)</td>
	<td class="summary">Retrieves an output.</td>
	</tr>

	<tr>
	<td class="name" nowrap><a href="#wirelink_metatable.__newindex">wirelink_metatable.__newindex</a>&nbsp;(self, k, v)</td>
	<td class="summary">Writes to an input.</td>
	</tr>

	<tr>
	<td class="name" nowrap><a href="#wirelink_metatable:entity">wirelink_metatable:entity</a>&nbsp;()</td>
	<td class="summary">Returns the entity that the wirelink represents </td>
	</tr>

	<tr>
	<td class="name" nowrap><a href="#wirelink_metatable:inputType">wirelink_metatable:inputType</a>&nbsp;(name)</td>
	<td class="summary">Returns the type of input name, or nil if it doesn't exist </td>
	</tr>

	<tr>
	<td class="name" nowrap><a href="#wirelink_metatable:inputs">wirelink_metatable:inputs</a>&nbsp;()</td>
	<td class="summary">Returns a table of all of the wirelink's inputs </td>
	</tr>

	<tr>
	<td class="name" nowrap><a href="#wirelink_metatable:isValid">wirelink_metatable:isValid</a>&nbsp;()</td>
	<td class="summary">Checks if a wirelink is valid.</td>
	</tr>

	<tr>
	<td class="name" nowrap><a href="#wirelink_metatable:isWired">wirelink_metatable:isWired</a>&nbsp;(name)</td>
	<td class="summary">Checks if an input is wired.</td>
	</tr>

	<tr>
	<td class="name" nowrap><a href="#wirelink_metatable:outputType">wirelink_metatable:outputType</a>&nbsp;(name)</td>
	<td class="summary">Returns the type of output name, or nil if it doesn't exist </td>
	</tr>

	<tr>
	<td class="name" nowrap><a href="#wirelink_metatable:outputs">wirelink_metatable:outputs</a>&nbsp;()</td>
	<td class="summary">Returns a table of all of the wirelink's outputs </td>
	</tr>

</table>




<h2>Tables</h2>
<table class="table_list">

	<tr>
	<td class="name" nowrap><a href="#SF.Wire.WlMetatable">SF.Wire.WlMetatable</a></td>
	<td class="summary"> </td>
	</tr>

</table>



<br/>
<br/>




<h2><a name="functions"></a>Functions</h2>
<dl class="function">



<dt><a name="SF.Wire.AddInputType"></a><strong>SF.Wire.AddInputType</strong>&nbsp;(name, converter)</dt>
<dd>
Adds an input type


<h3>Parameters:</h3>
<ul>
	
	<li>
	  <code><em>name</em></code>: Input type name. Case insensitive.
	</li>
	
	<li>
	  <code><em>converter</em></code>: The function used to convert the wire data to SF data (eg, wrapping)
	</li>
	
</ul>








</dd>




<dt><a name="SF.Wire.AddOutputType"></a><strong>SF.Wire.AddOutputType</strong>&nbsp;(name, deconverter)</dt>
<dd>
Adds an output type


<h3>Parameters:</h3>
<ul>
	
	<li>
	  <code><em>name</em></code>: Output type name. Case insensitive.
	</li>
	
	<li>
	  <code><em>deconverter</em></code>: The function used to check for the appropriate type and convert the SF data to wire data (eg, unwrapping)
	</li>
	
</ul>








</dd>




<dt><a name="SF.Wire.WlUnwrap"></a><strong>SF.Wire.WlUnwrap</strong>&nbsp;(wrapped)</dt>
<dd>



<h3>Parameters:</h3>
<ul>
	
	<li>
	  <code><em>wrapped</em></code>: 
	</li>
	
</ul>








</dd>




<dt><a name="SF.Wire.WlWrap"></a><strong>SF.Wire.WlWrap</strong>&nbsp;(wirelink)</dt>
<dd>



<h3>Parameters:</h3>
<ul>
	
	<li>
	  <code><em>wirelink</em></code>: 
	</li>
	
</ul>








</dd>




<dt><a name="wire_library.createInputs"></a><strong>wire_library.createInputs</strong>&nbsp;(names, types)</dt>
<dd>
Creates/Modifies wire inputs. All wire ports must begin with an uppercase letter and contain only alphabetical characters.


<h3>Parameters:</h3>
<ul>
	
	<li>
	  <code><em>names</em></code>: An array of input names. May be modified by the function.
	</li>
	
	<li>
	  <code><em>types</em></code>: An array of input types. May be modified by the function.
	</li>
	
</ul>








</dd>




<dt><a name="wire_library.createOutputs"></a><strong>wire_library.createOutputs</strong>&nbsp;(names, types)</dt>
<dd>
Creates/Modifies wire outputs. All wire ports must begin with an uppercase letter and contain only alphabetical characters.


<h3>Parameters:</h3>
<ul>
	
	<li>
	  <code><em>names</em></code>: An array of output names. May be modified by the function.
	</li>
	
	<li>
	  <code><em>types</em></code>: An array of output types. May be modified by the function.
	</li>
	
</ul>








</dd>




<dt><a name="wire_library.self"></a><strong>wire_library.self</strong>&nbsp;()</dt>
<dd>
Returns the wirelink representing this entity. This is how you read inputs.









</dd>




<dt><a name="wirelink_metatable.__index"></a><strong>wirelink_metatable.__index</strong>&nbsp;(self, k)</dt>
<dd>
Retrieves an output. Returns nil if the input doesn't exist.


<h3>Parameters:</h3>
<ul>
	
	<li>
	  <code><em>self</em></code>: 
	</li>
	
	<li>
	  <code><em>k</em></code>: 
	</li>
	
</ul>








</dd>




<dt><a name="wirelink_metatable.__newindex"></a><strong>wirelink_metatable.__newindex</strong>&nbsp;(self, k, v)</dt>
<dd>
Writes to an input.


<h3>Parameters:</h3>
<ul>
	
	<li>
	  <code><em>self</em></code>: 
	</li>
	
	<li>
	  <code><em>k</em></code>: 
	</li>
	
	<li>
	  <code><em>v</em></code>: 
	</li>
	
</ul>








</dd>




<dt><a name="wirelink_metatable:entity"></a><strong>wirelink_metatable:entity</strong>&nbsp;()</dt>
<dd>
Returns the entity that the wirelink represents









</dd>




<dt><a name="wirelink_metatable:inputType"></a><strong>wirelink_metatable:inputType</strong>&nbsp;(name)</dt>
<dd>
Returns the type of input name, or nil if it doesn't exist


<h3>Parameters:</h3>
<ul>
	
	<li>
	  <code><em>name</em></code>: 
	</li>
	
</ul>








</dd>




<dt><a name="wirelink_metatable:inputs"></a><strong>wirelink_metatable:inputs</strong>&nbsp;()</dt>
<dd>
Returns a table of all of the wirelink's inputs









</dd>




<dt><a name="wirelink_metatable:isValid"></a><strong>wirelink_metatable:isValid</strong>&nbsp;()</dt>
<dd>
Checks if a wirelink is valid. (ie. doesn't point to an invalid entity)









</dd>




<dt><a name="wirelink_metatable:isWired"></a><strong>wirelink_metatable:isWired</strong>&nbsp;(name)</dt>
<dd>
Checks if an input is wired.


<h3>Parameters:</h3>
<ul>
	
	<li>
	  <code><em>name</em></code>: 
	</li>
	
</ul>








</dd>




<dt><a name="wirelink_metatable:outputType"></a><strong>wirelink_metatable:outputType</strong>&nbsp;(name)</dt>
<dd>
Returns the type of output name, or nil if it doesn't exist


<h3>Parameters:</h3>
<ul>
	
	<li>
	  <code><em>name</em></code>: 
	</li>
	
</ul>








</dd>




<dt><a name="wirelink_metatable:outputs"></a><strong>wirelink_metatable:outputs</strong>&nbsp;()</dt>
<dd>
Returns a table of all of the wirelink's outputs









</dd>


</dl>




<h2><a name="tables"></a>Tables</h2>
<dl class="table">

<dt><a name="SF.Wire.WlMetatable"></a><strong>SF.Wire.WlMetatable</strong></dt>
<dd><br /><br />



</dd>


</dl>




</div> <!-- id="content" -->

</div> <!-- id="main" -->

<div id="about">
	<p><a href="http://validator.w3.org/check?uri=referer"><img src="http://www.w3.org/Icons/valid-xhtml10" alt="Valid XHTML 1.0!" height="31" width="88" /></a></p>
</div> <!-- id="about" -->

</div> <!-- id="container" -->	
</body>
</html>
